﻿
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using TTEngine.Graphics;
namespace TTEngine
{
    //加载器负责加载最基础的文本&二进制
    public interface IBaseLoader
    {
        string AssetPath
        {
            get;
        }
        string UserDataPath
        {
            get;
        }
        void SetAssetPath(string assetpath);
        void SetUserDataPath(string userdatapath);
        Task<byte[]> LoadAssetBinAsync(string path);
        Task<string> LoadAssetTextAsync(string path);
    }

    public interface ILoader:IBaseLoader
    {
      
      

        IImage LoadImage(byte[] data);
        unsafe IImage LoadImage(byte* data,uint length);
        IAnimatedImage LoadAnimatedImage(byte[] data);
        ISystemTtfFontFamily LoadTTF(byte[] data);
        unsafe ISystemTtfFontFamily LoadTTF(byte* data,uint length);
    }



}
